using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class SyncRequest : GeneratedMessageLite<SyncRequest, SyncRequest.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<SyncRequest, SyncRequest.Builder>
		{
			private bool resultIsReadOnly;
			private SyncRequest result;
			protected override SyncRequest.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override SyncRequest MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override SyncRequest DefaultInstanceForType
			{
				get
				{
					return SyncRequest.DefaultInstance;
				}
			}
			public BaseRequest BaseRequest
			{
				get
				{
					return this.result.BaseRequest;
				}
				set
				{
					this.SetBaseRequest(value);
				}
			}
			public SKBuiltinString_t UserName
			{
				get
				{
					return this.result.UserName;
				}
				set
				{
					this.SetUserName(value);
				}
			}
			public uint SyncKey
			{
				get
				{
					return this.result.SyncKey;
				}
				set
				{
					this.SetSyncKey(value);
				}
			}
			public int Scene
			{
				get
				{
					return this.result.Scene;
				}
				set
				{
					this.SetScene(value);
				}
			}
			public int Option
			{
				get
				{
					return this.result.Option;
				}
				set
				{
					this.SetOption(value);
				}
			}
			public CmdList Oplog
			{
				get
				{
					return this.result.Oplog;
				}
				set
				{
					this.SetOplog(value);
				}
			}
			public string KeyBuf
			{
				get
				{
					return this.result.KeyBuf;
				}
				set
				{
					this.SetKeyBuf(value);
				}
			}
			public Builder()
			{
				this.result = SyncRequest.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(SyncRequest cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private SyncRequest PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					SyncRequest other = this.result;
					this.result = new SyncRequest();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override SyncRequest.Builder Clear()
			{
				this.result = SyncRequest.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override SyncRequest.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new SyncRequest.Builder(this.result);
				}
				return new SyncRequest.Builder().MergeFrom(this.result);
			}
			public override SyncRequest BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override SyncRequest.Builder MergeFrom(IMessageLite other)
			{
				if (other is SyncRequest)
				{
					return this.MergeFrom((SyncRequest)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override SyncRequest.Builder MergeFrom(SyncRequest other)
			{
				return this;
			}
			public override SyncRequest.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override SyncRequest.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(SyncRequest._syncRequestFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = SyncRequest._syncRequestFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 24u)
					{
						if (num3 <= 10u)
						{
							if (num3 == 0u)
							{
								throw InvalidProtocolBufferException.InvalidTag();
							}
							if (num3 == 10u)
							{
								BaseRequest.Builder builder = BaseRequest.CreateBuilder();
								if (this.result.hasBaseRequest)
								{
									builder.MergeFrom(this.BaseRequest);
								}
								input.ReadMessage(builder, extensionRegistry);
								this.BaseRequest = builder.BuildPartial();
								continue;
							}
						}
						else
						{
							if (num3 == 18u)
							{
								SKBuiltinString_t.Builder builder2 = SKBuiltinString_t.CreateBuilder();
								if (this.result.hasUserName)
								{
									builder2.MergeFrom(this.UserName);
								}
								input.ReadMessage(builder2, extensionRegistry);
								this.UserName = builder2.BuildPartial();
								continue;
							}
							if (num3 == 24u)
							{
								this.result.hasSyncKey = input.ReadUInt32(ref this.result.syncKey_);
								continue;
							}
						}
					}
					else
					{
						if (num3 <= 40u)
						{
							if (num3 == 32u)
							{
								this.result.hasScene = input.ReadInt32(ref this.result.scene_);
								continue;
							}
							if (num3 == 40u)
							{
								this.result.hasOption = input.ReadInt32(ref this.result.option_);
								continue;
							}
						}
						else
						{
							if (num3 == 50u)
							{
								CmdList.Builder builder3 = CmdList.CreateBuilder();
								if (this.result.hasOplog)
								{
									builder3.MergeFrom(this.Oplog);
								}
								input.ReadMessage(builder3, extensionRegistry);
								this.Oplog = builder3.BuildPartial();
								continue;
							}
							if (num3 == 58u)
							{
								this.result.hasKeyBuf = input.ReadString(ref this.result.keyBuf_);
								continue;
							}
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public SyncRequest.Builder SetBaseRequest(BaseRequest value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBaseRequest = true;
				this.result.baseRequest_ = value;
				return this;
			}
			public SyncRequest.Builder SetBaseRequest(BaseRequest.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasBaseRequest = true;
				this.result.baseRequest_ = builderForValue.Build();
				return this;
			}
			public SyncRequest.Builder MergeBaseRequest(BaseRequest value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasBaseRequest && this.result.baseRequest_ != BaseRequest.DefaultInstance)
				{
					this.result.baseRequest_ = BaseRequest.CreateBuilder(this.result.baseRequest_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.baseRequest_ = value;
				}
				this.result.hasBaseRequest = true;
				return this;
			}
			public SyncRequest.Builder ClearBaseRequest()
			{
				this.PrepareBuilder();
				this.result.hasBaseRequest = false;
				this.result.baseRequest_ = null;
				return this;
			}
			public SyncRequest.Builder SetUserName(SKBuiltinString_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasUserName = true;
				this.result.userName_ = value;
				return this;
			}
			public SyncRequest.Builder SetUserName(SKBuiltinString_t.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasUserName = true;
				this.result.userName_ = builderForValue.Build();
				return this;
			}
			public SyncRequest.Builder MergeUserName(SKBuiltinString_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasUserName && this.result.userName_ != SKBuiltinString_t.DefaultInstance)
				{
					this.result.userName_ = SKBuiltinString_t.CreateBuilder(this.result.userName_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.userName_ = value;
				}
				this.result.hasUserName = true;
				return this;
			}
			public SyncRequest.Builder ClearUserName()
			{
				this.PrepareBuilder();
				this.result.hasUserName = false;
				this.result.userName_ = null;
				return this;
			}
			public SyncRequest.Builder SetSyncKey(uint value)
			{
				this.PrepareBuilder();
				this.result.hasSyncKey = true;
				this.result.syncKey_ = value;
				return this;
			}
			public SyncRequest.Builder ClearSyncKey()
			{
				this.PrepareBuilder();
				this.result.hasSyncKey = false;
				this.result.syncKey_ = 0u;
				return this;
			}
			public SyncRequest.Builder SetScene(int value)
			{
				this.PrepareBuilder();
				this.result.hasScene = true;
				this.result.scene_ = value;
				return this;
			}
			public SyncRequest.Builder ClearScene()
			{
				this.PrepareBuilder();
				this.result.hasScene = false;
				this.result.scene_ = 0;
				return this;
			}
			public SyncRequest.Builder SetOption(int value)
			{
				this.PrepareBuilder();
				this.result.hasOption = true;
				this.result.option_ = value;
				return this;
			}
			public SyncRequest.Builder ClearOption()
			{
				this.PrepareBuilder();
				this.result.hasOption = false;
				this.result.option_ = 0;
				return this;
			}
			public SyncRequest.Builder SetOplog(CmdList value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasOplog = true;
				this.result.oplog_ = value;
				return this;
			}
			public SyncRequest.Builder SetOplog(CmdList.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasOplog = true;
				this.result.oplog_ = builderForValue.Build();
				return this;
			}
			public SyncRequest.Builder MergeOplog(CmdList value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasOplog && this.result.oplog_ != CmdList.DefaultInstance)
				{
					this.result.oplog_ = CmdList.CreateBuilder(this.result.oplog_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.oplog_ = value;
				}
				this.result.hasOplog = true;
				return this;
			}
			public SyncRequest.Builder ClearOplog()
			{
				this.PrepareBuilder();
				this.result.hasOplog = false;
				this.result.oplog_ = null;
				return this;
			}
			public SyncRequest.Builder SetKeyBuf(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasKeyBuf = true;
				this.result.keyBuf_ = value;
				return this;
			}
			public SyncRequest.Builder ClearKeyBuf()
			{
				this.PrepareBuilder();
				this.result.hasKeyBuf = false;
				this.result.keyBuf_ = "";
				return this;
			}
		}
		public const int BaseRequestFieldNumber = 1;
		public const int UserNameFieldNumber = 2;
		public const int SyncKeyFieldNumber = 3;
		public const int SceneFieldNumber = 4;
		public const int OptionFieldNumber = 5;
		public const int OplogFieldNumber = 6;
		public const int KeyBufFieldNumber = 7;
		private static readonly SyncRequest defaultInstance;
		private static readonly string[] _syncRequestFieldNames;
		private static readonly uint[] _syncRequestFieldTags;
		private bool hasBaseRequest;
		private BaseRequest baseRequest_;
		private bool hasUserName;
		private SKBuiltinString_t userName_;
		private bool hasSyncKey;
		private uint syncKey_;
		private bool hasScene;
		private int scene_;
		private bool hasOption;
		private int option_;
		private bool hasOplog;
		private CmdList oplog_;
		private bool hasKeyBuf;
		private string keyBuf_ = "";
		private int memoizedSerializedSize = -1;
		public static SyncRequest DefaultInstance
		{
			get
			{
				return SyncRequest.defaultInstance;
			}
		}
		public override SyncRequest DefaultInstanceForType
		{
			get
			{
				return SyncRequest.DefaultInstance;
			}
		}
		protected override SyncRequest ThisMessage
		{
			get
			{
				return this;
			}
		}
		public BaseRequest BaseRequest
		{
			get
			{
				return this.baseRequest_ ?? BaseRequest.DefaultInstance;
			}
		}
		public SKBuiltinString_t UserName
		{
			get
			{
				return this.userName_ ?? SKBuiltinString_t.DefaultInstance;
			}
		}
		public uint SyncKey
		{
			get
			{
				return this.syncKey_;
			}
		}
		public int Scene
		{
			get
			{
				return this.scene_;
			}
		}
		public int Option
		{
			get
			{
				return this.option_;
			}
		}
		public CmdList Oplog
		{
			get
			{
				return this.oplog_ ?? CmdList.DefaultInstance;
			}
		}
		public string KeyBuf
		{
			get
			{
				return this.keyBuf_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasBaseRequest && this.hasUserName && this.hasSyncKey && this.hasScene && this.hasOption && this.hasOplog && this.BaseRequest.IsInitialized && this.Oplog.IsInitialized;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasBaseRequest)
				{
					num += CodedOutputStream.ComputeMessageSize(1, this.BaseRequest);
				}
				if (this.hasUserName)
				{
					num += CodedOutputStream.ComputeMessageSize(2, this.UserName);
				}
				if (this.hasSyncKey)
				{
					num += CodedOutputStream.ComputeUInt32Size(3, this.SyncKey);
				}
				if (this.hasScene)
				{
					num += CodedOutputStream.ComputeInt32Size(4, this.Scene);
				}
				if (this.hasOption)
				{
					num += CodedOutputStream.ComputeInt32Size(5, this.Option);
				}
				if (this.hasOplog)
				{
					num += CodedOutputStream.ComputeMessageSize(6, this.Oplog);
				}
				if (this.hasKeyBuf)
				{
					num += CodedOutputStream.ComputeStringSize(7, this.KeyBuf);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private SyncRequest()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] syncRequestFieldNames = SyncRequest._syncRequestFieldNames;
			if (this.hasBaseRequest)
			{
				output.WriteMessage(1, syncRequestFieldNames[0], this.BaseRequest);
			}
			if (this.hasUserName)
			{
				output.WriteMessage(2, syncRequestFieldNames[6], this.UserName);
			}
			if (this.hasSyncKey)
			{
				output.WriteUInt32(3, syncRequestFieldNames[5], this.SyncKey);
			}
			if (this.hasScene)
			{
				output.WriteInt32(4, syncRequestFieldNames[4], this.Scene);
			}
			if (this.hasOption)
			{
				output.WriteInt32(5, syncRequestFieldNames[3], this.Option);
			}
			if (this.hasOplog)
			{
				output.WriteMessage(6, syncRequestFieldNames[2], this.Oplog);
			}
			if (this.hasKeyBuf)
			{
				output.WriteString(7, syncRequestFieldNames[1], this.KeyBuf);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasBaseRequest)
			{
				num ^= this.baseRequest_.GetHashCode();
			}
			if (this.hasUserName)
			{
				num ^= this.userName_.GetHashCode();
			}
			if (this.hasSyncKey)
			{
				num ^= this.syncKey_.GetHashCode();
			}
			if (this.hasScene)
			{
				num ^= this.scene_.GetHashCode();
			}
			if (this.hasOption)
			{
				num ^= this.option_.GetHashCode();
			}
			if (this.hasOplog)
			{
				num ^= this.oplog_.GetHashCode();
			}
			if (this.hasKeyBuf)
			{
				num ^= this.keyBuf_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object value)
		{
			SyncRequest syncRequest = value as SyncRequest;
			return syncRequest != null && (this.hasBaseRequest == syncRequest.hasBaseRequest && (!this.hasBaseRequest || this.baseRequest_.Equals(syncRequest.baseRequest_))) && (this.hasUserName == syncRequest.hasUserName && (!this.hasUserName || this.userName_.Equals(syncRequest.userName_))) && (this.hasSyncKey == syncRequest.hasSyncKey && (!this.hasSyncKey || this.syncKey_.Equals(syncRequest.syncKey_))) && (this.hasScene == syncRequest.hasScene && (!this.hasScene || this.scene_.Equals(syncRequest.scene_))) && (this.hasOption == syncRequest.hasOption && (!this.hasOption || this.option_.Equals(syncRequest.option_))) && (this.hasOplog == syncRequest.hasOplog && (!this.hasOplog || this.oplog_.Equals(syncRequest.oplog_))) && (this.hasKeyBuf == syncRequest.hasKeyBuf && (!this.hasKeyBuf || this.keyBuf_.Equals(syncRequest.keyBuf_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<SyncRequest, SyncRequest.Builder>.PrintField("BaseRequest", this.hasBaseRequest, this.baseRequest_, writer);
			GeneratedMessageLite<SyncRequest, SyncRequest.Builder>.PrintField("UserName", this.hasUserName, this.userName_, writer);
			GeneratedMessageLite<SyncRequest, SyncRequest.Builder>.PrintField("SyncKey", this.hasSyncKey, this.syncKey_, writer);
			GeneratedMessageLite<SyncRequest, SyncRequest.Builder>.PrintField("Scene", this.hasScene, this.scene_, writer);
			GeneratedMessageLite<SyncRequest, SyncRequest.Builder>.PrintField("Option", this.hasOption, this.option_, writer);
			GeneratedMessageLite<SyncRequest, SyncRequest.Builder>.PrintField("Oplog", this.hasOplog, this.oplog_, writer);
			GeneratedMessageLite<SyncRequest, SyncRequest.Builder>.PrintField("KeyBuf", this.hasKeyBuf, this.keyBuf_, writer);
		}
		public static SyncRequest ParseFrom(byte[] data)
		{
			return SyncRequest.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private SyncRequest MakeReadOnly()
		{
			return this;
		}
		public static SyncRequest.Builder CreateBuilder()
		{
			return new SyncRequest.Builder();
		}
		public override SyncRequest.Builder ToBuilder()
		{
			return SyncRequest.CreateBuilder(this);
		}
		public override SyncRequest.Builder CreateBuilderForType()
		{
			return new SyncRequest.Builder();
		}
		public static SyncRequest.Builder CreateBuilder(SyncRequest prototype)
		{
			return new SyncRequest.Builder(prototype);
		}
		static SyncRequest()
		{
			SyncRequest.defaultInstance = new SyncRequest().MakeReadOnly();
			SyncRequest._syncRequestFieldNames = new string[]
			{
				"BaseRequest",
				"KeyBuf",
				"Oplog",
				"Option",
				"Scene",
				"SyncKey",
				"UserName"
			};
			SyncRequest._syncRequestFieldTags = new uint[]
			{
				10u,
				58u,
				50u,
				40u,
				32u,
				24u,
				18u
			};
			object.ReferenceEquals(micromsg.Proto.SyncRequest.Descriptor, null);
		}
	}
}
